package edu.cuit.avatar.dao.bean;

import edu.cuit.avatar.dao.UserDao;
import jakarta.annotation.Resource;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author <a href="mailto:1020zhaodan@163.com">Adan</a>
 * @version 1.0
 * @date 2025/8/14 10:19
 */
@Repository
public class UserDaoBean implements UserDao {
    @Resource private JdbcTemplate template;
    @Override
    public void updateScoreById(int userId, int score) {
        template.update("update user set score=score + ? where id=?", score, userId);
    }
}
